package com.generalbackend.common.service;

import com.generalbackend.common.model.query.UpdatePasswordQuery;
import com.generalbackend.common.model.vo.UserVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author tim.xie
 * @date 2022/7/8 16:20
 */
public interface IPersonalInformationService {

    /**
     * 获取正在登录的用户信息
     * @return
     */
    UserVO getPersonalInformation();

    /**
     * 修改用户信息
     * @param userVO
     * @return
     */
    boolean updateUser(UserVO userVO);

    /**
     * 上传用户头像
     * @param file
     * @return
     */
    String uploadAvatar(MultipartFile file);

    /**
     * 用户头像下载
     * @param response
     * @param childDir
     * @param randomFolder
     * @param filename
     */
    void downloadAvatar(HttpServletResponse response, String childDir, String randomFolder, String filename);

    /**
     * 用户密码修改
     * @param updatePasswordQuery
     * @return
     */
    boolean updatePassword(UpdatePasswordQuery updatePasswordQuery);

}
